/**
 * Created by yangjingbo on 17-6-4.
 */
angular.module('alert', [])
    .component('alert', {
        templateUrl: 'component/base/alert/alert.html',
        controller: ['$scope','$rootScope', function($scope,$rootScope){
            $scope.alertTex=$rootScope.alerttex;
            $scope.succstate=$rootScope.succState;
            $rootScope.$watch('alerttex',function (tex) {
                $scope.alertTex=tex;
            });$rootScope.$watch('succState',function (tex) {
                $scope.succstate=tex;
            });
            $scope.clockAlert=clockAlert;
            function clockAlert() {
                $rootScope.showAlert=false;
                sucFunReturn();
            }
            function sucFunReturn() {
                return $rootScope.sucfun?$rootScope.sucfun():'';
            }

        }]
    });
